package 第三章;

import java.io.Serializable;

/**
 *
 * @TableName employee
 */
public class Employee implements Serializable {
    /**
     *
     */
    private Integer eid;

    /**
     *
     */
    private String ename;

    /**
     *
     */
    private Integer eage;

    /**
     *
     */
    private String eposition;

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public Integer getEid() {
        return eid;
    }

    /**
     *
     */
    public void setEid(Integer eid) {
        this.eid = eid;
    }

    /**
     *
     */
    public String getEname() {
        return ename;
    }

    /**
     *
     */
    public void setEname(String ename) {
        this.ename = ename;
    }

    /**
     *
     */
    public Integer getEage() {
        return eage;
    }

    /**
     *
     */
    public void setEage(Integer eage) {
        this.eage = eage;
    }

    /**
     *
     */
    public String getEposition() {
        return eposition;
    }

    /**
     *
     */
    public void setEposition(String eposition) {
        this.eposition = eposition;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Employee other = (Employee) that;
        return (this.getEid() == null ? other.getEid() == null : this.getEid().equals(other.getEid()))
                && (this.getEname() == null ? other.getEname() == null : this.getEname().equals(other.getEname()))
                && (this.getEage() == null ? other.getEage() == null : this.getEage().equals(other.getEage()))
                && (this.getEposition() == null ? other.getEposition() == null : this.getEposition().equals(other.getEposition()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEid() == null) ? 0 : getEid().hashCode());
        result = prime * result + ((getEname() == null) ? 0 : getEname().hashCode());
        result = prime * result + ((getEage() == null) ? 0 : getEage().hashCode());
        result = prime * result + ((getEposition() == null) ? 0 : getEposition().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", eid=").append(eid);
        sb.append(", ename=").append(ename);
        sb.append(", eage=").append(eage);
        sb.append(", eposition=").append(eposition);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}